﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FotoAlbum
{
    public sealed partial class Preview : Form
    {
        public Preview(string filename)
        {
            InitializeComponent();
            pictureBox1.Image = new Bitmap(filename);
            pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
            pictureBox1.Invalidate();
        }

        protected override void OnResize(EventArgs e)
        {
            pictureBox1.Size = Size;
            base.OnResize(e);
        }
    }
}
